package com.example.demo_dongruan;

import com.baidubce.qianfan.Qianfan;
import com.baidubce.qianfan.model.chat.ChatResponse;

public class Demo {
    public static void main(String[] args) {
        // 使用安全认证AK/SK鉴权，替换下列示例中参数，安全认证Access Key替换your_iam_ak，Secret Key替换your_iam_sk
        Qianfan qianfan = new Qianfan("ALTAKbTHj6UElkuDpSd9lc8OAx", "98e09c0fac2a45d7aa721332b47c887a");

        // 调用默认模型
        ChatResponse resp = qianfan.chatCompletion()
                .addMessage("user", "你好")
                .execute();
        System.out.println(resp.getResult());
    }
}
